Data compression is required in data handling processes, where too much data is present for practical applications using the data. Commonly, compression is used in communication links, where the time to transmit is long, or where bandwidth is limited. Another use for compression is in data storage, where the amount of media space on which the data is stored can be substantially reduced with compression. A device showing either or both of these cases is a digital copier where an intermediate storage is used for collation, reprint or any other digital copier functions. Additionally, digital copiers often allow the printing of externally received data. Generally speaking, scanned images and print masters, i.e., electronic representations of hard copy documents, are commonly large, and thus are desirable candidates for compression.
The method disseminated by the JPEG committee for still image compression is described in detail in "JPEG: Still Image Compression Standard", by W. Pennebaker and J. Mitchell, published by Van Nostrand Reinhold in 1992. We will refer to the lossy compression modes based on the discrete cosine transform and it will be called JPEG compression in this application. JPEG compression is a lossy system that reduces data redundancies based on pixel to pixel correlations. Generally, in images, on a pixel to pixel basis, an image does not change very much. An image therefore has what is known as "natural spatial correlation". In natural scenes, correlation is generalized, but not exact. Noise makes each pixel somewhat different from its neighbors.
Generally, as shown in FIG. 1, a JPEG compression and decompression system is illustrated. A more complete discussion may be had by referencing U.S. Pat. No. 5,321,522 to Eschbach and U.S. Pat. No. 5,359,676 to Fan. The entire contents of U.S. Pat. No. 5,321,522 and U.S. Pat. No. 5,359,676 are hereby incorporated by reference.
Initially provided is tile memory 10 for storing an M.times.M portion of the image. From the portion of the image stored in tile memory, the discrete cosine transform (DCT), transformer 12 forms a frequency space representation of the image. Hardware implementations are available, such as the C-Cube Microsystems CL550A JPEG image compression processor, which operates in either the compression or the decompression mode according to the proposed JPEG standard. As will be described below, the implementation of the invention can be in either in software or hardware.
A divisor/quantization device 14 is used, from a set of values referred to as a Q-Table, stored in a Q table memory 16, so that a distinct Q table value is divided into the DCT value, returning the integer portion of the value as the quantized DCT value. A statistical encoder 20 often using Huffman codes is used to endcode the quantized DCT values to generate the compressed image that is output for storage, transmission, etc.
Discrete cosine transforms are well known, and hardware exists to perform the transform on image data, e.g., U.S. Pat. No. 5,049,991 to Niihara, U.S. Pat. No. 5,001,559 to Gonzales et al., and U.S. Pat. No. 4,999,705 to Puri.
To decompress the now-compressed image, and with reference to FIG. 1, a series of functions or steps are followed to reverse the process described. Huffian encoding is removed at decoder 50. The image signal now represents the quantized DCT coefficients, which are multiplied at signal multiplier 52 by the Q table values in memory 54 in a process inverse to the compression process. At inverse transformer 56, the inverse transform of the discrete cosine transform is derived, and the output image in the spatial domain is stored at image buffer 58.
In U.S. Pat. No. 5,321,522 and U.S. Pat. No. 5,379,122 to Eschbach, U.S. Pat. No. 5,359,676 to Fan, the standard process described in FIG. 1 is varied. The original image is compressed; the compressed representation is decompressed. The decompressed image is additionally filtered to improve appearance, but in doing so, it may be forced outside the range of images that are possibly derived from the original image. The DCT representation of the image is therefore altered, in order to force the image into the acceptable range of images. The processes may be used iteratively.
Some image formats that involve compression such those using JPEG inflict degradation to the image. When a system invokes to print one of these compressed images, the incoming image may receive special processing to remove those artifacts. First, however, one has to determine whether the image was compressed beforehand.
The present invention proposes a method to identify whether the image was compressed in the past. Moreover, the present invention proposes a method to identify whether the image was JPEG compressed in the past. By enabling identification of compressed images, the present invention will enable the printing system to steer a compressed image towards a cleaning image processing operation, thereby enabling the printing system to clean-up the image from any undesirable artifacts.
The method of the present invention is based on the analysis of subtle blocking discontinuities that are present and readily discernible in compressed images. For example in producing JPEG compressed images, the image is divided into blocks that are transformed, quantized, and compressed virtually independently. Thus, discontinuities across block boundaries (blocking effects) account for the most noticeable compression artifact caused by JPEG compression. The higher the compression the higher the blocking. The present invention performs an analysis of the blocking discontinuities as an indicative of compression history.